package org.xx.armory.commons;

import java.io.Serial;

public class UnmappableCodePointException
        extends RuntimeException {
    @Serial
    private static final long serialVersionUID = 1L;

    private final int codePoint;

    public UnmappableCodePointException(
            int codePoint
    ) {
        this.codePoint = codePoint;
    }

    public int getCodePoint() {
        return this.codePoint;
    }

    @Override
    public String getMessage() {
        return "Unmappable code point: 0x" + Integer.toHexString(this.codePoint);
    }
}
